The present invention relates generally to the field of mirror copies of data stored on a data storage device, and more particularly to Mirror Write Consistency (MWC).
Mirror Write Consistency is the name of a parameter associated with a data portion (for example, a Logical Volume (LV)). In conventional systems, the MWC parameter associated with the data portion is a one-bit (Yes or No) value. This binary MWC value indicates that all mirror copy(ies) for the data portion have been completely made (this is sometimes referred to as the “mirror copy(ies) being in sync”). If the MWC value indicates that all mirror copies are in sync, then read operations can read data from any mirror copy (based, for example, on efficiency concerns), rather than necessarily accessing the original version of the data.
In some conventional systems, the Logical Volume Manager (LVM) ensures data consistency among mirrored copies of a logical volume during normal I/O processing. For every write to a logical volume, the LVM generates a write request for every mirrored copy. A problem arises if a logical volume hosting one of the mirrored writes crashes in the middle of processing a mirrored write (before all copies are written). If mirror write consistency recovery is requested for a logical volume, the LVM keeps additional information to allow recovery of these inconsistent mirrors. In some conventional systems, MWC recovery is performed for most mirrored logical volumes.
In some conventional systems, the MWC record consists of one sector near the beginning (outer edge) of each disk. This MWC record maintains the information of recent writes in memory until some predetermined number of writes have been performed. After the predetermined number of write operations have occurred, the MWC record flushes this information into persistent storage and then actual data. The MWC record identifies which logical partitions may be inconsistent if the system shuts down incorrectly.
One term used throughout this application is varyon. To varyon or vary a volume group back online means that the volume group is made available for users for access and use. When a volume group is varied back online, the volume group is made available to the system by the LVM reading information about the volume group to initialize the volume device drive structures with the information about the volume group. When the volume group is varied back online, the MWC record is used to make the logical partitions consistent again.